<template>
    <div class="gesc">
        <div class="left">
            <header>
                <h2>国风中文网</h2>
                <a class="more" href="">更多>>></a>
            </header>
            <div class="m-book-four">
                <div class="contents">
                    <ul class="book f-cb" >
                        <li :class="bookclass[index]" v-for="(item,index) in GuofengList" :key="item.index">
                            <div class="m-book-info f-cb">
                                <a class="cover" href="">
                                    <img :src='item.imgurl' alt="">
                                </a>
                                <h3>{{item.name}}</h3>
                                <p>{{item.host}}</p>
                                <p class='disc eps'>{{item.message}}</p>
                                <a class="read" href="">立即阅读>>></a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="right">
            <header>
                <h2>国风中文网畅销榜</h2>
            </header>
            <div class="m-foldlist">
                <ul v-for="(paih,index) in PaihangList" :key="paih.index">
                    <li>
                        <p class="fold" v-show="xianshi[index]"  @mouseenter="enters(index)">
                            <a href="">
                                <i>{{'0'+(index +1)}}</i>{{paih.name}}                             </a>
                        </p>
                        <div class="unfold" v-show="!xianshi[index]" >
                            <i>{{'0'+(index +1)}}</i>
                            <div class="border f-cb">
                                <a href="" class="img">
                                    <img :src='paih.imgurl' alt="">
                                </a>
                                <h3>
                                    <a href="">{{paih.name}}{{xianshi[index]}}</a>
                                </h3>
                                <p>{{paih.host}}</p>
                            </div>
                        </div>
                    </li>

                </ul>
                <a class='more' href="">
                    <i class="el-icon-right"></i>查看更多
                </a>
            </div>

        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            bookclass:['up','up rt','','rt'],
            GuofengList: [
            {
                    imgurl:'https://cms-bucket.ws.126.net/2019/04/04/06ced583b74b4816976a8820c238d8a6.jpeg?imageView&quality=90&thumbnail=114y160',
                    name:'民国奇人',
                    host:'南无袈裟理科佛',
                    message:'大乱之世，江湖浩荡，正所谓“天下风云出我辈，民国奇人北斗来”，这七个，乃何人也？'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/-moHrp8L9FCtMn8Eom3fjg==/8796093023797198007?imageView&quality=90&thumbnail=114y160',
                    name:'大江大河',
                    host:'阿耐',
                    message:'作者阿耐，讲述了改革开放30多年的历史大背景下，以宋运辉、雷东宝、杨巡为代表的先行者们在变革浪潮中不断探索和突围的浮沉故事。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/ABSkVcmwyWg-weDHhVQ5fw==/8796093024683375325?imageView&quality=90&thumbnail=114y160',
                    name:'红日之孤军',
                    host:'却却',
                    message:'哈尔滨夜幕低垂，充满压抑绝望，而再漫长的夜，也有人前仆后继，屡败屡战，由死而生。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                }
            ],
            PaihangList:[
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                },
                {
                    imgurl:'https://easyreadfs.nosdn.127.net/OQ6_Oqqfg4BZLOipfr5c7w==/8796093024006730994?imageView&quality=90&thumbnail=114y160',
                    name:'个体崛起',
                    host:'陈立飞',
                    message:'一本帮助普通人实现爆发式成长的人生规划书，教我们用高效方法循序渐进地撑起自己的野心。'
                },
            ],
            xianshi:[
              false,true,true,true,true,true
            ],

        };
    },
    methods:{
        enters(index) {
          console.log('aaaa')
           for(let index in this.xianshi){
             this.xianshi[index] = true
          }
            this.xianshi[index] = false;

          let newArr = Object.assign([], this.xianshi);
      this.xianshi = newArr;
        },

    },
    watch:{


    }

};
</script>

<style>

li {
  list-style: none outside none;
}
a,
button {
  cursor: pointer;
}
a {
  text-decoration: none;
  color: #333;
  outline: none;
}
.gesc {
  margin-top: 40px !important;
  zoom: 1;
}
.book::after  {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
}
.gesc header {
  margin-bottom: 18px;
  position: relative;
}
.gesc header .more {
  position: absolute;
  top: 4px;
  right: 0;
  font-size: 13px;
  color: #888;
}
.gesc::after {
  display: block;
  clear: both;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  content: ".";
}
.gesc .left {
  float: left;
  width: 700px;
}
.gesc .contents {
  border: 1px solid #ebe6e1;
}
.gesc .right {
  position: relative;
  float: right;
  width: 260px;
}
.gesc::after {
  display: block;
  clear: both;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  content: ".";
}
.m-book-four ul li.up {
  border-bottom: 1px solid #ebe6e1;

}
.m-book-four ul li {
  float: left;
  padding: 20px;
  width: 308px;
  border-right: 1px solid #ebe6e1;
  cursor: default !important;
}
.m-book-four ul li.rt {
  border-right: none;
  padding-right: 21px;
}
.m-book-four ul li.rt {
  border-right: none;
  padding-right: 21px;
}
.m-book-info::after {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
}

.m-book-info .cover {
  float: left;
  display: inline;
  width: 114px;
  height: 160px;
  margin: 0 15px 0 0;
  overflow: hidden;
}
.m-book-info .cover img {
  width: 114px;
  height: 160px;
  box-shadow: 1px 1px 3px #aaa;
}

.m-book-info h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  max-height: 44px;
  line-height: 22px;
  overflow: hidden;
  font-size: 16px;
  color: #655;
  font-weight: 700;
  cursor: pointer;
}
.m-book-info h3:hover{
  color: yellowgreen;
}
.m-book-info{
    font: 12px/1.5 Helvetica Neue,Helvetica,tahoma,Arial,\5FAE\8F6F\96C5\9ED1;
}
.m-book-info p.disc {
  height: 54px;
  line-height: 18px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  letter-spacing: 1px;
  overflow: hidden;
}
.m-book-info p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  color: #888;
  line-height: 18px;
  margin: 6px 0 5px;
}
.m-book-info a.read {
    position: relative;
    top: 35px;
    right: 2px;
    bottom: 20px;
    left: 0px;
    color: #655;
    font-weight: 700;
}
.m-book-info a.read:hover{
  color: yellowgreen;
}
.m-book-info .cf-b {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
}
.gesc .right {
  position: relative;
  float: right;
  width: 260px;
}
.gesc header h2 {
  font-size: 18px;
  line-height: 18px;
  color: #000;
}
.gesc:after {
  display: block;
  clear: both;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  content: ".";
}

.m-foldlist {
  border: 1px solid #ebe6e1;
}
.m-foldlist li {
  border-bottom: 1px solid #f5f2f0;
}
.m-foldlist .fold,
.m-foldlist .fold a {
  height: 42px;
  line-height: 42px;
  overflow: hidden;
}
.m-foldlist .fold {
  padding: 0 14px 0 22px;
}
.m-foldlist .fold a {
  color: #655;
  font-size: 14px;
  display: block;
  width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-foldlist .fold,
.m-foldlist .fold a {
  height: 42px;
  line-height: 42px;
  overflow: hidden;
}
.m-foldlist .fold i {
  color: #aaa;
  margin-right: 16px;
  font-family: arial;
}
ul li .unfold {
  cursor: default !important;
}
.m-foldlist .unfold .img {
  float: left;
  margin-left: 34px;
  margin-right: 14px;
}
.m-foldlist .unfold {
  padding: 20px 14px 8px 20px;
  position: relative;
  height: 116px;
}
.m-foldlist .unfold i {
  position: absolute;
  top: 14px;
  left: 20px;
  color: #c9483c;
  font-size: 18px;
  font-family: arial;
}
.m-foldlist .unfold img {
  width: 74px;
  height: 104px;
}
.m-foldlist .unfold .img {
    float: left;
    margin-left: 34px;
    margin-right: 14px;
}
.m-foldlist .unfold h3 {
  font-size: 16px;
  line-height: 22px;
  max-height: 44px;
  overflow: hidden;
}
.m-foldlist .unfold h3 a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  color: #4c4c4c;
  font-weight: 700;
}

.m-foldlist .unfold p {
  color: #888;
  margin-top: 5px;
  font-size: 12px;
}
.m-foldlist a.more {
  position: relative;
  display: block;
  height: 41px;
  line-height: 41px;
  padding: 0 0 0 54px;
  font-size: 14px;
  color: #655;
  background-color: #fdfdfd;
}
.m-foldlist a.more i {
  position: absolute;
  width: 10px;
  height: 9px;
  top: 16px;
  left: 26px;
}
</style>
